<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudentParentThing extends Validate
{
    protected $rule = ['student_id' => 'require|number','thing_type' => 'require','thing_detail' => 'require',
    ];

    protected $message = ['student_id.require' => '学生ID为必填项','student_id.number' => '学生ID需为数字','thing_type.require' => '事情类型为必填项','thing_detail.require' => '事情详情为必填项',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['student_id','thing_type','thing_detail',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['student_id','thing_type','thing_detail',]);
    }
}
